Research
Security News
Kill Switch Hidden in npm Packages Typosquatting Chalk and Chokidar
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Takes a set of features, calculates the bbox of all input features, and returns a bounding box.
Parameters
geojson
(Feature | FeatureCollection) input featuresExamples
var input = {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {},
"geometry": {
"type": "Point",
"coordinates": [114.175329, 22.2524]
}
}, {
"type": "Feature",
"properties": {},
"geometry": {
"type": "Point",
"coordinates": [114.170007, 22.267969]
}
}, {
"type": "Feature",
"properties": {},
"geometry": {
"type": "Point",
"coordinates": [114.200649, 22.274641]
}
}, {
"type": "Feature",
"properties": {},
"geometry": {
"type": "Point",
"coordinates": [114.186744, 22.265745]
}
}
]
};
var bbox = turf.bbox(input);
var bboxPolygon = turf.bboxPolygon(bbox);
var resultFeatures = input.features.concat(bboxPolygon);
var result = {
"type": "FeatureCollection",
"features": resultFeatures
};
//=result
Returns Array<number> the bounding box of input
given
as an array in WSEN order (west, south, east, north)
This module is part of the Turfjs project, an open source module collection dedicated to geographic algorithms. It is maintained in the Turfjs/turf repository, where you can create PRs and issues.
Install this module individually:
$ npm install turf-bbox
Or install the Turf module that includes it as a function:
$ npm install turf
FAQs
turf bbox module
The npm package turf-bbox receives a total of 9,227 weekly downloads. As such, turf-bbox popularity was classified as popular.
We found that turf-bbox demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.